<template>
	<view>
		<j-cell-group title="设备分享">
		    <view class="u-f-ajc qrCode">
				<u-qrcode
				  ref="qrCode"
				  canvas-id="qrCode"
				  :value="text"
				  :size="size"
				  :options="{
				    foreground: {
				      image: {
				        src: 'https://statics.xmcsrv.net/account/HeadImage/jlink_7610.png',
				        width: 0.25,
				        height: 0.25,
				        align: ['center', 'center'],
				        anchor: [0, 0]
				      }
				    }
				  }"
				  @complete="complete($event, 'qrCode')"
				></u-qrcode>
		    	<!-- <image class="img" src="https://statics.xmcsrv.net/account/HeadImage/jlink_7610.png" mode=""></image> -->
		    </view>
		</j-cell-group>
		<j-cell-group title="已分享用户">
		    <j-cell v-for="(item,index) in userList" :key="index" title="用户1" :more="false">
				<view slot="tips" style="margin-right:20rpx;" @click="deleteUser(item)">
					<uni-icons type="trash" color="red" :size="30"></uni-icons>
				</view>
			</j-cell>
		</j-cell-group>
		
	</view>
</template>

<script>
	import uQrcode from '../../../components/Sansnn-uQRCode/components/u-qrcode/u-qrcode'
	export default {
		components:{
			uQrcode
		},
		data(){
			return{
				text: 'uQRCode',
				size: 150,
				userList:[1,3]
			}
		},
		onLoad() {
			
		},
		methods:{
			complete(e, refName) {
			  if (e.success) {
			    console.log(refName + '生成成功');
			  } else {
			    console.log(refName + '生成失败');
			  }
			},
			//删除用户
			deleteUser(item){
				
			}
			
			
		}
	}
</script>

<style>
	.qrCode{
		background: white;
		height: 404rpx;
		border-radius: 15rpx;
	}
	.img{
		width: 327rpx;
		height: 327rpx;
		background: red;
	}
</style>